package org.yzhang3.data.bean;

/**
 * Tree's Node
 * @author yzhang8015
 *
 */
public abstract class Node {

	private Node leftNode;
	private Node rightNode;

	public Node getLeftNode() {
		return leftNode;
	}

	public void setLeftNode(Node leftNode) {
		this.leftNode = leftNode;
	}

	public Node getRightNode() {
		return rightNode;
	}

	public void setRightNode(Node rightNode) {
		this.rightNode = rightNode;
	}
	
	/**
	 * whether this node is left node.
	 * @return
	 */
	public boolean isLeaf() {
		return null == leftNode && null == rightNode;
	}
	
}
